﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LabelPrintSystem
{
    public class PrintRecordInfo
    {
        public string ProductSN { set; get; }
        public string PCIP { set; get; }
        public DateTime RecordTime { set; get; }
        public string UserId { set; get; }
        public string TempName { set; get; }
        //设置打印类型：正常产品、改造产品、免测产品（交调、电性能、RCU免测）--->从set入手写格式
        public string Remark { set; get; }

        void CreatTable()
        {
            // create table tb_PrintRecord
            //(
            // [ID] [int] IDENTITY(1,1) NOT NULL,
            // [ProductSN] NVARCHAR(50) NOT NULL,
            // [PCIP] NVARCHAR(50) NOT NULL,
            // [RecordTime] datetime NOT NULL,
            // [UserId] NVARCHAR(50) NOT NULL ,
            // [TempName] NVARCHAR(50) NOT NULL ,
            // [Remark] NVARCHAR(50) NULL DEFAULT NULL
            // )
        }
    }

    public class ClsConfig
    {
        public enum SetModule : int
        {
            normal = 0,
            reform = 1,
            uCheck = 2
        }
        public int setModule { set; get; }
        public bool isuPIM { set; get; }
        public bool isuElectric { set; get; }
        public bool isuRcu { set; get; }
        public int numPIM { set; get; }
        public int numElectric { set; get; }
        public int numRcu { set; get; }
        public int numReform { set; get; }
        public bool isSpecial_R_AAU { get; set; }
        public bool isNokia { get; set; }
        public string sNokia = "S";
        public bool isCheckQrCode { get; set; }
        public ClsConfig()
        {
            this.setModule = 0;
            this.isuPIM =
            this.isuElectric =
            this.isuRcu = false;
            this.numPIM =
            this.numElectric =
            this.numRcu =
            this.numReform = 0;
        }
    }
    public class ClsPrintInfo
    {
        public string sTemplePath { get; set; }
        public List<string> PrinterName { get; set; }
        public string DefaultPrinterName { get; set; }
        public string SelectPrinterName { get; set; }
        // The list of filenames in the current folder
        public string[] browsingFormats { get; set; }
        public string SelectFormatName { get; set; }
        public string IdenticalCopies { get; set; }
        public string SerializedCopies { get; set; }
        public Dictionary<string, string> FormatSubStrings { get; set; }
        public Dictionary<string, string> FormatSubStringsChange { get; set; }
        public ClsConfig config { get; set; }
        public int TemType { set; get; }
        //吉安条码枪没有回车符,以条码长度来判断;此标志防止有回车符的条码枪扫描,同时触发两次事件
        public bool IsKeyPress { get; set; }

        public ClsPrintInfo()
        {
            config = new ClsConfig();
        }
    }

    public class ClsDataSpecial
    {//数据特采类
        public bool bEnable;//是否可用
        public bool bNeedCheckPIM;//是否需要交调测试
        public float fMaxVaule;//特采要求最大值
        public float fMinVaule;//特采要求最小值

        public void SetDataSpecial(bool enable, bool needPIM, float max, float min)
        {
            this.bEnable = enable;
            this.bNeedCheckPIM = needPIM;
            this.fMaxVaule = max;
            this.fMinVaule = min;
        }
    }
    public class PIMTestInfo
    {
        public string PIMRecordTime;
        public string PIMLimite;
        public float MaxPIMValue;
        public string PIMPass;
        public string Total;
        public string Total1;
        public string Element;
    }
    public class ClsDataProduct
    {//产品信息
        //天线条码或射频成品序列号
        public string sProductSN;
        //产品代码
        public string sProcode;
        //产品名称
        public string sProcodeName;
        //产品批次号(天线)
        public string sMOID;
        //客户成品代码（1P，射频专用3BK）  
        public string sClientProcode;
        //AAU天线，测试与出货条码不一致(模板更新为此代码，天线专用)
        public string sProductSN_R_AAU;
        public string ToFString()
        {
            string spe = "\r\n";
            string ret = "";
            ret += "天线条码：" + sProductSN + spe;
            ret += "产品代码：" + sProcode + spe;
            ret += "产品类型：" + sProcodeName + spe;
            ret += "产品MO号：" + sMOID + spe;
            return ret;
        }
    }


}
